package com.crm.controller;

import com.crm.pojo.Role;
import com.crm.service.role.RoleService;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;
import java.util.List;

@Controller
public class RoleController {
    @Resource
    private RoleService roleService;

    @ResponseBody
    @RequestMapping(value = "/find/role")
    public List<Role> findAllRole() throws Exception {
        List<Role> roleList = roleService.findAllRole();

        return roleList;
    }
}